import Vue from 'vue'
export default{
    namespaced:true,
    state:()=>({
        user:[
            {
                username:'张三',
                password:'abc',
                phone:'18323585971',
               isonline:false,
            },
            {
                username:'李四',
                password:'123',
                phone:'13961501970',
                isonline:false,
            }
        ],
            
        
    }),
   mutations:{
       onLine(state,i){
        state.user[i].isonline=true;
       },
       addUser(state,obj){
           state.user.push(obj)
       }
   }
}